:root {
    --ink: #071014;
    --ink-soft: #121a1f;
    --mist: #d7e4dc;
    --mist-dim: rgba(215, 228, 220, 0.62);
    --teal: #1f9b84;
    --teal-bright: #34d6b5;
    --copper: #c9874a;
    --line: rgba(215, 228, 220, 0.16);
    --panel: rgba(10, 16, 20, 0.72);
    --font-display: "Syne", sans-serif;
    --font-body: "DM Sans", sans-serif;
    --radius: 22px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-gate {
    margin: 0;
    color: var(--mist);
    font-family: var(--font-body);
    background: var(--ink);
    overflow-x: hidden;
}

.auth-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.auth-atmosphere__image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(7, 16, 20, 0.72) 12%, rgba(7, 16, 20, 0.28) 52%, rgba(7, 16, 20, 0.7) 100%),
        url("https://concretebatchingplants.in/public/img/bg-5.png") center / cover no-repeat;
    transform: scale(1.08);
    animation: auth-drift 28s var(--ease-out) infinite alternate;
}

.auth-atmosphere__mesh {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(40% 35% at 18% 22%, rgba(31, 155, 132, 0.28), transparent 70%),
        radial-gradient(35% 40% at 78% 18%, rgba(201, 135, 74, 0.18), transparent 72%),
        radial-gradient(45% 40% at 70% 78%, rgba(52, 214, 181, 0.12), transparent 70%);
    filter: blur(8px);
    animation: auth-mesh 16s ease-in-out infinite alternate;
}

.auth-atmosphere__grain {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.auth-atmosphere__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
}

.auth-atmosphere__orb--a {
    width: 28vw;
    height: 28vw;
    left: -8vw;
    bottom: -10vw;
    background: rgba(31, 155, 132, 0.35);
    animation: auth-orb 12s ease-in-out infinite alternate;
}

.auth-atmosphere__orb--b {
    width: 22vw;
    height: 22vw;
    right: -6vw;
    top: 12vh;
    background: rgba(201, 135, 74, 0.25);
    animation: auth-orb 14s ease-in-out infinite alternate-reverse;
}

.auth-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
    padding: clamp(1.5rem, 4vw, 4.5rem);
}

.auth-brand__mark {
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.92;
    background: linear-gradient(120deg, #f2f7f4 10%, var(--teal-bright) 48%, var(--copper) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.auth-brand__title {
    margin: 0;
    max-width: 12ch;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.6vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #f4f8f6;
}

.auth-brand__title span {
    color: var(--mist-dim);
}

.auth-brand__lede {
    margin: 1.1rem 0 0;
    max-width: 34ch;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--mist-dim);
}

.auth-panel {
    width: min(100%, 420px);
    justify-self: end;
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-panel__head {
    margin-bottom: 1.35rem;
    text-align: left;
}

.auth-panel__logo {
    display: block;
    width: auto;
    max-width: 168px;
    height: 54px;
    margin-bottom: 1.1rem;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
    animation: auth-logo 4.5s ease-in-out infinite;
}

.auth-panel__head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-panel__head p {
    margin: 0.35rem 0 0;
    color: var(--mist-dim);
    font-size: 0.95rem;
}

.auth-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.auth-alert--warn {
    background: rgba(201, 135, 74, 0.16);
    border: 1px solid rgba(201, 135, 74, 0.35);
    color: #f0d2b0;
}

.auth-alert--info {
    background: rgba(31, 155, 132, 0.14);
    border: 1px solid rgba(52, 214, 181, 0.28);
    color: #b7efe3;
}

.auth-field {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.95rem;
}

.auth-field span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mist-dim);
}

.auth-field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #f5faf7;
    padding: 0.95rem 1rem;
    font: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.auth-field input::placeholder {
    color: rgba(215, 228, 220, 0.35);
}

.auth-field input:focus {
    border-color: rgba(52, 214, 181, 0.55);
    box-shadow: 0 0 0 4px rgba(31, 155, 132, 0.18);
    transform: translateY(-1px);
}

.auth-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 0.55rem;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.2rem;
    background: linear-gradient(120deg, var(--teal) 0%, #187a69 45%, var(--copper) 140%);
    color: #041014;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, filter 0.3s ease;
    box-shadow: 0 14px 30px rgba(31, 155, 132, 0.28);
}

.auth-submit:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 36px rgba(31, 155, 132, 0.38);
    filter: saturate(1.08);
}

.auth-submit:active {
    transform: translateY(0) scale(0.99);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-panel__foot {
    margin: 1rem 0 0;
    text-align: center;
}

.auth-panel__foot a {
    color: var(--mist-dim);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-panel__foot a:hover {
    color: var(--teal-bright);
}

.auth-submit__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: auth-shine 4.8s ease-in-out infinite;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: auth-rise 0.9s var(--ease-out) forwards;
    animation-delay: var(--d, 0s);
}

.validationMessage {
    color: #ff8f8f;
    font-size: 0.85rem;
    font-weight: 600;
}

@keyframes auth-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-drift {
    from { transform: scale(1.08) translate3d(0, 0, 0); }
    to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}

@keyframes auth-mesh {
    from { transform: translate3d(0, 0, 0) rotate(0deg); }
    to { transform: translate3d(3%, -2%, 0) rotate(4deg); }
}

@keyframes auth-orb {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(8%, -6%, 0) scale(1.12); }
}

@keyframes auth-logo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes auth-shine {
    0%, 55% { transform: translateX(-120%); }
    75%, 100% { transform: translateX(120%); }
}

@media (max-width: 900px) {
    .auth-stage {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 1.25rem;
    }

    .auth-brand {
        padding-top: 1.5rem;
    }

    .auth-panel {
        justify-self: stretch;
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
