.login-page {
    min-height: 100vh;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    color: #e8f6ee;
    background: #06241b;
    overflow-x: hidden;
}

.login-scene {
    position: relative;
    min-height: 100vh;
    isolation: isolate;
}

.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background:
        radial-gradient(1200px 700px at 10% -10%, #1aa36f 0%, transparent 55%),
        radial-gradient(900px 500px at 90% 110%, #c9a22733 0%, transparent 50%),
        linear-gradient(160deg, #041910 0%, #0b3d2e 48%, #08291f 100%);
}

.login-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(232, 246, 238, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 246, 238, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
    animation: login-grid-shift 28s linear infinite;
}

.login-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    mix-blend-mode: screen;
}

.login-aurora-a {
    width: 46vw;
    height: 46vw;
    min-width: 320px;
    min-height: 320px;
    left: -12%;
    top: -18%;
    background: #1aa36f;
    animation: login-drift 18s ease-in-out infinite;
}

.login-aurora-b {
    width: 38vw;
    height: 38vw;
    min-width: 280px;
    min-height: 280px;
    right: -8%;
    top: 18%;
    background: #c9a227;
    opacity: 0.28;
    animation: login-drift 22s ease-in-out infinite reverse;
}

.login-aurora-c {
    width: 42vw;
    height: 30vw;
    min-width: 260px;
    bottom: -16%;
    left: 28%;
    background: #14835d;
    animation: login-drift 16s ease-in-out infinite 2s;
}

.login-ring {
    position: absolute;
    border: 1px solid rgba(201, 162, 39, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.login-ring-a {
    width: 280px;
    height: 280px;
    left: 18%;
    bottom: 8%;
    animation: login-pulse-ring 8s ease-out infinite;
}

.login-ring-b {
    width: 420px;
    height: 420px;
    left: 12%;
    bottom: -4%;
    animation: login-pulse-ring 8s ease-out infinite 1.6s;
}

.login-ring-c {
    width: 220px;
    height: 220px;
    right: 12%;
    top: 14%;
    border-color: rgba(26, 163, 111, 0.28);
    animation: login-pulse-ring 10s ease-out infinite 0.8s;
}

.login-ecg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 9%;
    width: 100%;
    height: 80px;
    opacity: 0.35;
}

.login-ecg path {
    fill: none;
    stroke: #7de0b2;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 220 980;
    animation: login-ecg 6.5s linear infinite;
    filter: drop-shadow(0 0 6px #1aa36f);
}

.login-particle {
    position: absolute;
    left: calc(var(--i) * 4.8%);
    bottom: -8%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 10px rgba(125, 224, 178, 0.8);
    animation: login-rise calc(10s + var(--i) * 0.35s) linear infinite;
    animation-delay: calc(var(--i) * -0.55s);
}

.login-icon {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 28px;
    height: 28px;
    opacity: 0.28;
    animation: login-float 7.5s ease-in-out infinite;
    animation-delay: var(--d);
    transform: scale(var(--s));
    filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.35));
}

.login-icon-cross {
    background: #c9a227;
    clip-path: polygon(38% 0, 62% 0, 62% 38%, 100% 38%, 100% 62%, 62% 62%, 62% 100%, 38% 100%, 38% 62%, 0 62%, 0 38%, 38% 38%);
}

.login-icon-pill {
    width: 18px;
    height: 28px;
    border-radius: 20px;
    background: linear-gradient(#e8f6ee 50%, #1aa36f 50%);
    transform: rotate(28deg) scale(var(--s));
}

.login-icon-capsule {
    width: 34px;
    height: 14px;
    border-radius: 20px;
    background: linear-gradient(90deg, #c9a227 50%, #e8f6ee 50%);
}

.login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
    place-items: center stretch;
    padding: 36px 6vw 40px;
    background: transparent;
}

.login-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1aa36f, #0f6b4c);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(15, 107, 76, 0.45);
}

.login-mark svg {
    width: 22px;
    height: 22px;
}

.login-brand strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0.01em;
}

.login-brand small {
    color: #b7d4c6;
    font-size: 12px;
}

.login-lead {
    margin: 0;
    max-width: 34rem;
    color: #d7efe4;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 500;
}

.login-cast {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 8px;
    min-height: 380px;
}

.login-figure {
    position: relative;
    margin: 0;
    width: min(320px, 42vw);
    animation: login-bob 5.2s ease-in-out infinite;
}

.login-figure-apoteker {
    width: min(330px, 44vw);
    margin-left: -36px;
    animation-duration: 5.8s;
    animation-delay: 0.7s;
    z-index: 1;
}

.login-glow {
    position: absolute;
    inset: 18% 8% 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 163, 111, 0.5), transparent 70%);
    filter: blur(18px);
    z-index: 0;
    animation: login-glow 4.5s ease-in-out infinite;
}

.login-figure img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    clip-path: ellipse(48% 50% at 50% 42%);
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.35));
}

.login-figure figcaption {
    position: relative;
    z-index: 2;
    margin-top: -18px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a227;
    font-weight: 700;
}

.login-page .login-card {
    width: min(420px, 100%);
    justify-self: end;
    background: #fff;
    color: var(--ink);
    border-radius: 22px;
    padding: 32px 30px 26px;
    box-shadow:
        0 30px 80px rgba(4, 25, 16, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: login-card-in 0.7s ease both;
    z-index: 2;
}

.login-page .login-card h1 {
    margin: 0 0 4px;
    font-size: 26px;
    color: #0b3d2e;
}

.login-card-lead {
    margin: 0 0 18px;
}

.login-page .login-card input[type="email"],
.login-page .login-card input[type="password"] {
    padding: 11px 12px;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-page .login-card input:focus {
    outline: none;
    border-color: #0f6b4c;
    box-shadow: 0 0 0 3px rgba(15, 107, 76, 0.18);
}

.login-submit {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(180deg, #1aa36f, #0f6b4c);
    box-shadow: 0 10px 20px rgba(15, 107, 76, 0.28);
}

.login-submit:hover {
    background: linear-gradient(180deg, #1db37a, #14835d);
}

@keyframes login-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4%, 6%) scale(1.08); }
}

@keyframes login-grid-shift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 56px 56px, 56px 56px; }
}

@keyframes login-pulse-ring {
    0% { transform: scale(0.82); opacity: 0.55; }
    70% { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
}

@keyframes login-ecg {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1200; }
}

@keyframes login-rise {
    0% { transform: translateY(0) scale(0.4); opacity: 0; }
    12% { opacity: 0.8; }
    100% { transform: translateY(-110vh) scale(1); opacity: 0; }
}

@keyframes login-float {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(var(--s, 1)); }
    50% { transform: translateY(-14px) rotate(8deg) scale(var(--s, 1)); }
}

@keyframes login-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes login-glow {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.08); }
}

@keyframes login-card-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .login-wrap {
        grid-template-columns: 1fr;
        padding: 24px 20px 36px;
        gap: 12px;
    }
    .login-page .login-card {
        justify-self: stretch;
        width: 100%;
        background: #fff;
        backdrop-filter: none;
    }
    .login-cast {
        min-height: 240px;
        justify-content: center;
    }
    .login-figure,
    .login-figure-apoteker {
        width: min(200px, 42vw);
        margin-left: 0;
    }
    .login-lead {
        font-size: 16px;
        text-align: center;
        margin-inline: auto;
    }
    .login-brand {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-aurora,
    .login-mesh,
    .login-ring,
    .login-ecg path,
    .login-particle,
    .login-icon,
    .login-figure,
    .login-glow,
    .login-page .login-card {
        animation: none !important;
    }
}
