/* AMOXRUNS — login page styles.
   Design authored by the product owner; moved verbatim from the template's
   inline <style> block into this external file. Do not redesign.
   Brand treatment (owner-approved): full-viewport height and cobalt accent
   color applied over the original layout.
   Invisible hardening only: icon offsets on the inputs use logical
   properties so the layout mirrors correctly in Dari/Pashto RTL (§11.3). */

.amoxruns-login {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
    background: #fff;
    overflow: hidden;
}

/* LEFT SIDE */
.login-visual {
    position: relative;
    overflow: hidden;
    background: #0b0d10;
    color: #fff;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 76% 27%,
            rgba(255,255,255,.08),
            transparent 26%
        ),
        linear-gradient(
            135deg,
            rgba(255,255,255,.03),
            transparent 42%
        );
    pointer-events: none;
}

.amoxruns-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border: 1px solid rgb(var(--brand-accent) / .35);
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgb(var(--brand-primary) / .12);
    color: rgb(var(--brand-accent));
}

.brand-icon svg {
    width: 22px;
    height: 22px;
}

.brand-accent {
    color: rgb(var(--brand-accent));
}

.login-hero {
    position: relative;
    z-index: 2;
    max-width: 620px;
    padding: 45px 0 25px;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    font-size: 12px;
    color: #d7dbe1;
    margin-bottom: 20px;
}

.login-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgb(var(--brand-accent));
    box-shadow: 0 0 0 5px rgb(var(--brand-primary) / .18);
}

.login-hero h2 {
    margin: 0 0 18px;
    max-width: 580px;
    font-size: clamp(35px, 4vw, 58px);
    line-height: 1.02;
    letter-spacing: -.055em;
    font-weight: 750;
}

.hero-accent {
    color: rgb(var(--brand-accent));
}

.login-hero p {
    max-width: 520px;
    margin: 0;
    color: #aeb4bd;
    font-size: 16px;
    line-height: 1.65;
}

/* CAR ANIMATION */
.car-stage {
    position: relative;
    height: 255px;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.car-glow {
    position: absolute;
    bottom: 10px;
    width: 430px;
    height: 105px;
    border-radius: 50%;
    filter: blur(32px);
    background: radial-gradient(
        closest-side,
        rgb(var(--brand-primary) / .32),
        rgba(255, 255, 255, .08) 60%,
        transparent
    );
}

.animated-car {
    position: relative;
    width: min(540px, 94%);
    height: 182px;
    animation: carFloat 3.2s ease-in-out infinite;
}

.car-body {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 35px;
    height: 78px;
    border-radius: 58% 42% 16% 18% / 70% 60% 30% 32%;
    background:
        linear-gradient(
            180deg,
            #f0f2f5 0%,
            #a7adb5 42%,
            #656b72 100%
        );
    box-shadow:
        inset 0 6px 15px rgba(255,255,255,.55),
        0 20px 40px rgba(0,0,0,.38);
}

.car-body::before {
    content: "";
    position: absolute;
    left: 20%;
    top: -61px;
    width: 57%;
    height: 72px;
    background: linear-gradient(155deg, #bfc5cb, #535a61 76%);
    clip-path: polygon(
        18% 100%,
        34% 11%,
        75% 7%,
        100% 100%
    );
    border-radius: 20px 28px 0 0;
}

.car-body::after {
    content: "";
    position: absolute;
    left: 35%;
    top: -50px;
    width: 36%;
    height: 46px;
    background: linear-gradient(145deg, #20262d, #78838d);
    clip-path: polygon(
        10% 100%,
        24% 8%,
        73% 6%,
        98% 100%
    );
    opacity: .95;
}

/* Brand cobalt headlight on the nose of the car. */
.car-light {
    position: absolute;
    right: 7%;
    bottom: 56px;
    width: 12px;
    height: 8px;
    border-radius: 4px;
    background: rgb(var(--brand-accent));
    box-shadow: 0 0 14px 4px rgb(var(--brand-primary) / .48);
}

.car-wheel {
    position: absolute;
    bottom: 14px;
    width: 63px;
    height: 63px;
    border-radius: 50%;
    background: #111;
    border: 9px solid #2d3137;
    box-shadow:
        0 0 0 2px #777 inset,
        0 9px 18px rgba(0,0,0,.5);
    animation: wheelSpin 1.1s linear infinite;
}

.car-wheel::after {
    content: "";
    position: absolute;
    inset: 15px;
    border: 3px solid #9298a0;
    border-radius: 50%;
}

.car-wheel-left {
    left: 20%;
}

.car-wheel-right {
    right: 19%;
}

.road-line {
    position: absolute;
    bottom: 8px;
    width: 90%;
    height: 1px;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.24),
            transparent
        );
}

.road-line::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -35%;
    width: 35%;
    height: 3px;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgb(var(--brand-accent) / .85),
            transparent
        );
    animation: roadMove 1.7s linear infinite;
}

@keyframes carFloat {
    0%, 100% {
        transform: translate3d(0,0,0) rotate(0deg);
    }

    50% {
        transform: translate3d(10px,-6px,0) rotate(-.4deg);
    }
}

@keyframes wheelSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes roadMove {
    to {
        left: 110%;
    }
}

/* FEATURES */

.login-check {
    color: rgb(var(--brand-accent));
    font-weight: 700;
}

.login-features {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #afb5be;
    font-size: 12px;
}

/* FORM SIDE */

.login-form-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
    background: white;
    transition: background-color .2s ease, color .2s ease;
}

.login-form {
    width: min(410px, 100%);
}

.login-toolbar {
    position: absolute;
    z-index: 3;
    top: 24px;
    inset-inline-end: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-language-form select,
.login-theme-button {
    height: 40px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    color: #4b5563;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.login-language-form select {
    min-width: 104px;
    padding: 0 34px 0 12px;
    padding-inline: 12px 34px;
    font-size: 13px;
    font-weight: 600;
}

.login-theme-button {
    width: 40px;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.login-theme-button:hover,
.login-language-form select:hover {
    border-color: rgb(var(--brand-primary));
}

.login-theme-button svg {
    width: 18px;
    height: 18px;
}

.theme-moon {
    display: none;
}

.dark .theme-sun {
    display: none;
}

.dark .theme-moon {
    display: block;
}

.login-form h1 {
    margin: 0 0 10px;
    font-size: 34px;
    letter-spacing: -.045em;
    font-weight: 750;
    color: #111827;
}

.login-subtitle {
    margin-bottom: 30px;
    color: #747b85;
    font-size: 14px;
    line-height: 1.55;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #292d32;
    font-size: 13px;
    font-weight: 600;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: #969ca5;
    pointer-events: none;
}

.login-input {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 42px;
    padding-inline-start: 42px;
    padding-inline-end: 44px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    outline: none;
    font-size: 16px;
    transition: .18s;
}

.login-input:focus {
    border-color: rgb(var(--brand-primary));
    box-shadow: 0 0 0 3px rgb(var(--brand-primary) / .18);
}

.login-input::placeholder {
    color: #969ca5;
}

.password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 5px;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #818892;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.password-toggle:hover {
    background: #f3f4f6;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.login-submit {
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: 10px;
    background: rgb(var(--brand-primary));
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.login-submit:hover {
    background: rgb(var(--brand-hover));
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgb(var(--brand-primary) / .24);
}

.login-submit:focus-visible {
    outline: 3px solid rgb(var(--brand-primary) / .35);
    outline-offset: 2px;
}

.login-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 2px 0 22px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #4b5563;
    font-size: 13px;
    cursor: pointer;
}

.login-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: rgb(var(--brand-primary));
}

.login-help {
    color: rgb(var(--brand-hover));
    font-size: 13px;
    font-weight: 600;
    text-align: end;
}

html[dir="rtl"] .login-hero h2,
html[dir="rtl"] .login-form h1 {
    letter-spacing: 0;
    line-height: 1.22;
}

html[dir="rtl"] .login-input {
    text-align: start;
}

html[dir="rtl"] input[type="email"] {
    direction: ltr;
    text-align: left;
}

/* Dark login surface: the visual panel stays intentionally cinematic while
   the form surface and controls follow the user's saved/system theme. */
.dark .amoxruns-login,
.dark .login-form-side {
    background: #020617;
}

.dark .login-form h1,
.dark .login-field label {
    color: #f8fafc;
}

.dark .login-subtitle,
.dark .login-remember {
    color: #94a3b8;
}

.dark .login-input,
.dark .login-language-form select,
.dark .login-theme-button {
    border-color: #334155;
    background: #0f172a;
    color: #e2e8f0;
}

.dark .login-input::placeholder {
    color: #64748b;
}

.dark .password-toggle {
    color: #94a3b8;
}

.dark .password-toggle:hover,
.dark .login-theme-button:hover {
    background: #1e293b;
}

.dark .login-help {
    color: rgb(var(--brand-accent));
}

.dark .login-error {
    border-color: rgba(251, 113, 133, .35);
    background: rgba(244, 63, 94, .12);
    color: #fda4af;
}

.dark .login-footer {
    color: #64748b;
}

.login-submit:active {
    transform: translateY(0);
}

.login-error {
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    color: #969ca4;
    font-size: 11px;
}

/* MOBILE */
@media (max-width: 820px) {
    .amoxruns-login {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-form-side {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 92px 24px 36px;
    }

    .login-toolbar {
        top: 20px;
        inset-inline: 24px;
        justify-content: flex-end;
    }

    .login-form h1 {
        font-size: 30px;
    }
}

@media (max-width: 420px) {
    .login-form-side {
        padding-inline: 20px;
    }

    .login-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animated-car,
    .car-wheel,
    .road-line::after {
        animation: none !important;
    }
}
