/* default login background — same teal/slate language as the subsystem chooser (site.subsystem-select.css),
   with a calm, abstract, slowly shifting composition when no custom wallpaper is set */
.login-default-bg {
    background-color: #0f172a;
    background-image:
        radial-gradient(1200px 600px at 80% -10%, rgba(30, 95, 90, 0.85) 0%, transparent 60%),
        radial-gradient(960px 540px at 12% 90%, rgba(15, 118, 110, 0.28), transparent 62%),
        linear-gradient(135deg, #0f172a 0%, #0b3b39 52%, #0a2a28 100%);
    background-size: 220% 220%, 220% 220%, 200% 200%;
    background-attachment: fixed;
    background-position: 50% 50%, 50% 50%, 50% 50%;
}

/* abstract layer: drifting teal orbs + a slowly rotating conic light */
.login-default-bg::before {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(420px 420px at 22% 30%, rgba(15, 118, 110, 0.22), transparent 70%),
        radial-gradient(520px 520px at 78% 72%, rgba(30, 95, 90, 0.20), transparent 70%),
        radial-gradient(300px 300px at 60% 12%, rgba(45, 212, 191, 0.12), transparent 72%),
        radial-gradient(360px 360px at 14% 82%, rgba(20, 184, 166, 0.14), transparent 72%),
        radial-gradient(240px 240px at 88% 36%, rgba(15, 118, 110, 0.12), transparent 74%),
        conic-gradient(from 210deg at 70% 28%, rgba(15, 118, 110, 0.12), transparent 28%, rgba(45, 212, 191, 0.08) 55%, transparent 80%);
    background-repeat: no-repeat;
}

/* free-floating geometric shapes: soft rings + slowly rotating polygons */
.login-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.login-shapes span {
    position: absolute;
    display: block;
    border-radius: 50%;
    border: 1px solid rgba(45, 212, 191, 0.18);
    background: radial-gradient(circle at 30% 30%, rgba(15, 118, 110, 0.12), transparent 70%);
    will-change: transform;
}

.login-shapes span:nth-child(1) { width: 220px; height: 220px; left: 8%; top: 16%; animation: loginFloat 22s ease-in-out infinite; }
.login-shapes span:nth-child(2) { width: 130px; height: 130px; left: 64%; top: 18%; border-color: rgba(94, 234, 212, 0.16); animation: loginFloat 18s ease-in-out infinite reverse; }
.login-shapes span:nth-child(3) { width: 320px; height: 320px; left: 72%; top: 58%; animation: loginFloat 30s ease-in-out infinite; }
.login-shapes span:nth-child(4) { width: 90px; height: 90px; left: 22%; top: 70%; border-color: rgba(45, 212, 191, 0.22); animation: loginFloat 16s ease-in-out infinite reverse; }
.login-shapes span:nth-child(5) { width: 160px; height: 160px; left: 40%; top: 80%; border-radius: 24%; rotate: 18deg; animation: loginSpinFloat 28s linear infinite; }
.login-shapes span:nth-child(6) { width: 70px; height: 70px; left: 48%; top: 8%; border-radius: 24%; animation: loginSpinFloat 20s linear infinite reverse; }

/* structure layer: faint grid + soft diagonal sheen, masked to fade at the edges */
.login-default-bg::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.50;
    background-image:
        linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.04) 50%, transparent 62%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 280% 280%, 46px 46px, 46px 46px;
    background-repeat: no-repeat, repeat, repeat;
    mask-image: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.9), transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.9), transparent 80%);
    background-position: 50% 0%, 0 0, 0 0;
}

@keyframes loginFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -26px, 0) scale(1.06); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes loginSpinFloat {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(0, -20px, 0) rotate(180deg); }
    100% { transform: translate3d(0, 0, 0) rotate(360deg); }
}

#kt_app_root {
    position: relative;
    z-index: 1;
}

.ui-login-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.ui-login-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(220px, 70vw);
    max-height: 72px;
    object-fit: contain;
    object-position: center;
}

/* primary button / focus accents aligned with subsystem-select teal */
.login-default-bg .btn-primary {
    --bs-btn-bg: #0f766e;
    --bs-btn-border-color: #0f766e;
    --bs-btn-hover-bg: #0d9488;
    --bs-btn-hover-border-color: #0d9488;
    --bs-btn-active-bg: #0f766e;
    --bs-btn-active-border-color: #0f766e;
    --bs-btn-disabled-bg: #0f766e;
    --bs-btn-disabled-border-color: #0f766e;
}

.login-default-bg .link-primary {
    color: #0f766e !important;
}

/* respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .login-default-bg,
    .login-default-bg::before,
    .login-default-bg::after,
    .login-shapes span {
        animation: none;
    }
}
