/* ============================================
   LOGIN PAGE FACELIFT — FINAL POLISH
   Premium SaaS login experience
   Scoped to auth pages using login_master layout
   ============================================ */

/* ---- Animated gradient keyframe ---- */
@keyframes loginGradientShift {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* ---- Left Aside Panel ---- */
.login-aside {
    background: linear-gradient(135deg,
        #161729 0%,
        #1e1f38 25%,
        #252750 50%,
        #1c1d35 75%,
        #161729 100%) !important;
    background-size: 400% 400% !important;
    animation: loginGradientShift 16s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Decorative radial glow — top-left */
.login-aside::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 65%);
    top: -10%;
    left: -20%;
    pointer-events: none;
    z-index: 0;
}

/* Decorative radial glow — bottom-right */
.login-aside::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 158, 247, 0.06) 0%, transparent 65%);
    bottom: 5%;
    right: -12%;
    pointer-events: none;
    z-index: 0;
}

/* Content above decorative layers */
.login-aside > div {
    position: relative;
    z-index: 1;
}

/* ---- Logo ---- */
.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0 !important;
    text-decoration: none !important;
}

.login-logo img {
    height: 52px !important;
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.25));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.35s ease;
}

.login-logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.35));
}

/* ---- Tagline ---- */
.login-tagline {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    margin-top: 1.25rem;
    margin-bottom: 0;
    text-transform: uppercase;
}

/* ---- Background Illustration ---- */
.login-bg-illustration {
    min-height: 280px;
    opacity: 0.8;
    flex-shrink: 0;
}

/* ---- Right Body Panel ---- */
.login-body {
    background: #ffffff;
}

/* Form content should sit slightly above true center */
.login-body > .d-flex.flex-center {
    justify-content: flex-start !important;
    padding-top: 8vh !important;
}

/* ---- Form Wrapper ---- */
.login-form-wrapper {
    max-width: 420px !important;
    width: 100% !important;
    padding: 0 2rem !important;
}

/* ---- Heading ---- */
.login-form-wrapper .text-center.mb-10 {
    margin-bottom: 1.5rem !important;
}

.login-form-wrapper h1.text-dark {
    font-size: 1.625rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: #0f172a !important;
    margin-bottom: 0.375rem !important;
    line-height: 1.3;
}

/* Subtitle */
.login-form-wrapper .text-center.mb-10 > .indicator-label {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.01em;
    display: block;
    margin-top: 0.25rem;
}

/* "New Here?" block */
.login-form-wrapper .text-gray-400 {
    margin-top: 0.75rem !important;
    font-size: 0.8125rem !important;
}

/* ---- Form Fields ---- */
.login-form-wrapper .fv-row {
    margin-bottom: 1.125rem !important;
}

.login-form-wrapper .form-label {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    letter-spacing: 0.01em;
    margin-bottom: 0.375rem !important;
}

.login-form-wrapper .form-control.form-control-solid {
    background-color: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 0 1rem !important;
    height: 48px !important;
    font-size: 0.9375rem !important;
    color: #334155 !important;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                background-color 0.2s ease !important;
}

.login-form-wrapper .form-control.form-control-solid:focus {
    background-color: #ffffff !important;
    border-color: var(--theme-color, #009ef7) !important;
    box-shadow: 0 0 0 3.5px rgba(0, 158, 247, 0.08) !important;
    outline: none !important;
}

.login-form-wrapper .form-control.form-control-solid::placeholder {
    color: #b5b5c3 !important;
    font-weight: 400;
}

/* Password row — label + forgot link */
.login-form-wrapper .d-flex.flex-stack.mb-2 {
    margin-bottom: 0.375rem !important;
}

.login-form-wrapper .link-primary {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    transition: opacity 0.2s ease;
}

.login-form-wrapper .link-primary:hover {
    opacity: 0.7;
}

/* ---- CTA Button ---- */
.login-form-wrapper #kt_sign_in_submit {
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 10px !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10) !important;
    transition: transform 0.15s ease,
                box-shadow 0.15s ease !important;
    margin-top: 0.25rem;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.login-form-wrapper #kt_sign_in_submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.login-form-wrapper #kt_sign_in_submit:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

/* ---- Footer ---- */
.login-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 2rem !important;
    padding-bottom: 0.75rem !important;
    margin-top: auto;
}

.login-footer > .d-flex.flex-stack {
    max-width: 420px;
    width: 100%;
}

.login-footer .btn-light {
    border-radius: 8px !important;
    font-size: 0.8125rem !important;
    font-weight: 500;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    padding: 0.5rem 1.125rem !important;
    transition: all 0.15s ease;
    width: auto !important;
    min-width: unset !important;
    margin-bottom: 0 !important;
    color: #475569 !important;
}

.login-footer .btn-light:hover {
    border-color: #cbd5e1 !important;
    background-color: #f8fafc !important;
}

.login-footer .btn-flex.btn-link {
    font-size: 0.8125rem !important;
    color: #64748b !important;
}


/* ============================================
   RESPONSIVE — Tablet (768px — 1199.98px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .login-aside::before {
        width: 400px;
        height: 400px;
    }

    .login-aside::after {
        width: 300px;
        height: 300px;
    }

    .login-logo img {
        height: 44px !important;
    }

    .login-tagline {
        font-size: 0.6875rem;
    }

    .login-bg-illustration {
        min-height: 180px !important;
    }

    .login-body > .d-flex.flex-center {
        padding-top: 6vh !important;
    }

    .login-form-wrapper {
        max-width: 380px !important;
        padding: 0 1.5rem !important;
    }

    .login-form-wrapper h1.text-dark {
        font-size: 1.375rem !important;
    }

    .login-form-wrapper .text-center.mb-10 {
        margin-bottom: 1.25rem !important;
    }

    .login-form-wrapper .fv-row {
        margin-bottom: 1rem !important;
    }

    .login-footer {
        padding: 0.875rem 1.5rem !important;
    }

    .login-footer > .d-flex.flex-stack {
        max-width: 360px;
    }
}

/* ============================================
   RESPONSIVE — Mobile (< 768px)
   ============================================ */
@media (max-width: 767.98px) {
    /* Disable gradient animation on mobile for perf */
    .login-aside {
        animation: none !important;
        background-size: 100% 100% !important;
        min-height: 160px;
        max-height: 220px;
    }

    .login-aside::before {
        width: 220px;
        height: 220px;
        top: -15%;
        left: -15%;
    }

    .login-aside::after {
        display: none;
    }

    .login-logo {
        margin-bottom: 0 !important;
    }

    .login-logo img {
        height: 36px !important;
    }

    .login-tagline {
        font-size: 0.625rem;
        margin-top: 0.625rem;
        letter-spacing: 0.1em;
    }

    .login-bg-illustration {
        min-height: 60px !important;
        flex: 1;
    }

    .login-body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .login-body > .d-flex.flex-center {
        padding-top: 1.5rem !important;
        justify-content: flex-start !important;
    }

    .login-form-wrapper {
        max-width: 100% !important;
        padding: 0 1.25rem !important;
    }

    .login-form-wrapper .text-center.mb-10 {
        margin-bottom: 1.25rem !important;
    }

    .login-form-wrapper h1.text-dark {
        font-size: 1.25rem !important;
    }

    .login-form-wrapper .fv-row {
        margin-bottom: 0.875rem !important;
    }

    .login-form-wrapper .form-control.form-control-solid {
        height: 44px !important;
        border-radius: 8px !important;
    }

    .login-form-wrapper #kt_sign_in_submit {
        height: 44px !important;
        min-height: 44px !important;
        font-size: 0.875rem !important;
        border-radius: 8px !important;
    }

    .login-footer {
        padding: 0.75rem 1.25rem !important;
        border-top: 1px solid #f8fafc;
    }

    .login-footer > .d-flex.flex-stack {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.625rem;
        max-width: 100%;
    }

    .login-footer .me-10 {
        margin-right: 0 !important;
        margin-inline-end: 0 !important;
    }

    .login-footer .btn-light {
        width: auto !important;
        min-width: 180px !important;
    }
}

/* ============================================
   RESPONSIVE — Large Desktop (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .login-form-wrapper {
        max-width: 440px !important;
    }

    .login-body > .d-flex.flex-center {
        padding-top: 10vh !important;
    }

    .login-form-wrapper h1.text-dark {
        font-size: 1.75rem !important;
    }

    .login-logo img {
        height: 56px !important;
    }

    .login-bg-illustration {
        min-height: 340px;
    }

    .login-footer > .d-flex.flex-stack {
        max-width: 440px;
    }
}
